[HVM][SVM] Use proper name for the K8 VM_CR MSR.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 12 Oct 2006 16:53:51 +0000 (17:53 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 12 Oct 2006 16:53:51 +0000 (17:53 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/svm/svm.c
xen/include/asm-x86/msr.h

index ca4f8d52ae0dac4f975048cce98fd48630404605..ffefba24fc8f08429c6528feb79e825639c355f0 100644 (file)
@@ -842,12 +842,13 @@ int start_svm(void)
         return 0;
 
     /* check whether SVM feature is disabled in BIOS */
-    rdmsr(0xC0010114, eax, edx);
-    if ( eax & 0x00000010 ) {
+    rdmsr(MSR_K8_VM_CR, eax, edx);
+    if ( eax & K8_VMCR_SVME_DISABLE )
+    {
         printk("AMD SVM Extension is disabled in BIOS.\n");
         return 0;
     }
-    
+
     if (!(hsa[cpu] = alloc_host_save_area()))
         return 0;
     
index 07c09b2ae2c44e1b16f8c26b0ffdf0b9d6b1ea9b..31e2afd8bf6fb005e14efe3890c54e726cff8d6d 100644 (file)
@@ -302,8 +302,14 @@ static inline void wrmsrl(unsigned int msr, __u64 val)
 
 #define MSR_K8_TOP_MEM1                        0xC001001A
 #define MSR_K8_TOP_MEM2                        0xC001001D
+#define MSR_K8_SYSCFG                  0xC0010010
+#define MSR_K8_HWCR                    0xC0010015
+#define MSR_K8_VM_CR                   0xC0010114
 #define MSR_K8_VM_HSAVE_PA             0xC0010117
-#define MSR_K8_SYSCFG                  0xC0000010      
+
+/* MSR_K8_VM_CR bits: */
+#define _K8_VMCR_SVME_DISABLE          4
+#define K8_VMCR_SVME_DISABLE           (1 << _K8_VMCR_SVME_DISABLE)
 
 /* Centaur-Hauls/IDT defined MSRs. */
 #define MSR_IDT_FCR1                   0x107